﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace VisionCloud.Domain.DtoModel.Applet.RequestDto
{
    /// <summary>
    /// 数据诊断报告请求接口Dto
    /// </summary>
    public class MeasureDataAnalysisDto
    {
        /// <summary>
        /// 报告文件保存名称
        /// </summary>
        [JsonProperty("filename")]
        public string FileName { get; set; }

        /// <summary>
        /// 报告或中间结果保存目录
        /// </summary>
        [JsonProperty("save_dir")]
        public string SaveDir { get; set; }

        /// <summary>
        /// 测量项序号，从0开始，str。测量项共9项，即墙面平整度。例如mids="1,3,5"表示仅分析墙面垂直度、方正性和天花平整度;
        /// 取值为""则表示分析全部测量项
        /// </summary>
        [JsonProperty("mids")]
        public string Mids { get; set; } = string.Empty;

        /// <summary>
        /// 0：采用之前生成报告，1:重新生成；
        /// </summary>
        [JsonProperty("upd")]
        public string Upd { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        [JsonProperty("projname")]
        public string ProjectName { get; set; }

        /// <summary>
        /// 工程阶段
        /// </summary>
        [JsonProperty("projstage")]
        public string ProjectStage { get; set; }

        /// <summary>
        /// 任务类型：自检/巡检
        /// </summary>
        [JsonProperty("tasktype")]
        public string TaskType { get; set; }

        /// <summary>
        /// 任务属性：初测/复测/其他
        /// </summary>
        [JsonProperty("taskproperty")]
        public string TaskProperty { get; set; }

        /// <summary>
        /// 楼栋名称
        /// </summary>
        [JsonProperty("bdname")]
        public string BuildingName { get; set; }

        [JsonProperty("minfo")]
        public List<FloorQualityDto> Minfo { get; set; }
    }

    public class FloorQualityDto
    {
        /// <summary>
        /// 楼层名称
        /// </summary>
        [JsonProperty("floorName")]
        public string FloorName { get; set; }

        /// <summary>
        /// 站点号
        /// </summary>
        [JsonProperty("stnum")]
        public List<string> StNum { get; set; }

        /// <summary>
        /// 最大站点号
        /// </summary>
        [JsonProperty("maxst")]
        public string MaxSt { get; set; }

        /// <summary>
        /// 站点总数
        /// </summary>
        [JsonProperty("stcnt")]
        public int StCnt { get; set; }

        /// <summary>
        /// 每个站点各测量项的测点数和爆点数列表
        /// </summary>
        [JsonProperty("stinfo")]
        public List<int[]> PointMeasureItemData { get; set; } = new List<int[]>();
    }
}